'''
Raid TD - Walker Class
Programmer: Oscar Chang
Date: 4/19/2014
'''

import pygame, random, sys, math
from pygame.locals import *

d = {"right" : (32,0), "left" : (-32,0), "up" : (0,-32), "down" : (0,32)}

zombieImage = pygame.image.load("./gfx/zombie.jpg")

#Walker class
class Walkers:
    def __init__(self, start, screen, path):
        self.rect = Rect(start[0]*32,start[1]*32,32,32)
        self.screen = screen
        self.path = path
        self.color = (0,0,0)
        self.center = (self.rect.x+16, self.rect.y+16)
        self.pathIndex = 0
        self.hp = 1000

    def drawWalker(self):
        #pygame.draw.rect(self.screen, self.color, self.rect)
        self.screen.blit(zombieImage,self.rect)
        
    def updatePos(self):
        if self.pathIndex < len(self.path):
            coor = self.path[self.pathIndex]
            self.rect.x = coor[0]*32
            self.rect.y = coor[1]*32
            self.center = (self.rect.x+16, self.rect.y+16)
            self.pathIndex += 1

    def receiveDmg(self,dmg):
        self.hp -= dmg
                                 
                                 


                                 

                





















                    
